﻿using RuoVea.ExSugar.Entity;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace RuoVea.Stocks.Server.Models;

/// <summary>
/// 记录表
/// </summary>
[SugarTable(nameof(StockContent), "记录表")]
public class StockContent : EntityBase
{
    /// <summary>
    /// 分类:取字典:stocks_records
    /// </summary>
    [SugarColumn(ColumnDescription = "分类:取字典:stocks_records", IsNullable = false)]
    public long CategoryId { get; set; }
    /// <summary>
    /// 操作时间
    /// </summary>
    [SugarColumn(ColumnDescription = "操作时间", IsNullable = false)]
    public DateTime RecordTime { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    [SugarColumn(ColumnDescription = "Amount", IsNullable = false)]
    public double Amount { get; set; }

    /// <summary>
    /// 几手
    /// </summary>
    [SugarColumn(ColumnDescription = "几手", IsNullable = false)]
    public int Lots { get; set; }

    /// <summary>
    /// 买入/卖出
    /// </summary>
    [SugarColumn(ColumnDescription = "买入/卖出", IsNullable = false)]
    public int Purchase { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "10")]
    public int Sort { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Remark { get; set; }

}